package com.wanxi.order.Controller;

import com.wanxi.order.entity.Result;
import com.wanxi.order.vo.CreatOrderVo;
import com.wanxi.order.vo.OrderVo;
import com.wanxi.order.vo.PaymentVo;
import com.wanxi.order.vo.ShippingAddressVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user/orderDetail")
@RestController
@Api(tags = "确认订单接口")
public class OrderDetailController {
    @ApiOperation("确认订单接口")
    @PostMapping("/confirmOrder")
    public Result CreateOrder(CreatOrderVo creatOrderVo){
        Result result = new Result();
        OrderVo orderVo=new OrderVo();
        result.setData(orderVo);
        return result;
    }

    @ApiOperation("修改产品数量")
    @PostMapping("/updateProductAmount")
    public Result updateProductAmount(@ApiParam("订单id") Integer userId){
        Result result = new Result();
        OrderVo orderVo=new OrderVo();
        result.setData(orderVo);
        return result;
    }

    @ApiOperation("查找收货地址接口")
    @PostMapping("/findShippingAddress")
    public Result findShippingAddress(@ApiParam("用户id") Integer userId){
        Result result = new Result();
        ShippingAddressVo shippingAddressVo=new ShippingAddressVo();
        result.setData(shippingAddressVo);
        return result;
    }
    @ApiOperation("支付接口")
    @PostMapping("/payment")
    public Result payment(@ApiParam("支付金额") Double paymentAmont,
                          @ApiParam("订单号") Integer orderId){
        Result result = new Result();
        PaymentVo paymentVo=new PaymentVo();
        result.setData(paymentVo);
        return result;
    }

}
